package com.zbkj.crmeb.store.response;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * 功能描述: 拼团活动商品详情返回
 * @Author: wangzh
 * @Date: 2022/11/30 9:55
 */
@Data
@Accessors(chain = true)
@ApiModel("StoreProductGroupActivityResponse对象")
public class StoreProductGroupActivityResponse implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty("商品id")
    private Integer productId;

    @ApiModelProperty("商品图片")
    private String image;

    @ApiModelProperty("商品名称")
    private String productName;

    @ApiModelProperty("商品价格")
    private BigDecimal productPrice;

    @ApiModelProperty("商品库存")
    private Integer stock;

    @ApiModelProperty("拼团人数对应规格价格")
    private List<StoreProductGroupPriceResponse> storeProductGroupPriceResponses;

    @ApiModelProperty("拼团团长")
    private Integer leaderId;

    @Data
    @Accessors(chain = true)
    @ApiModel("StoreProductGroupPriceResponse对象")
    public static class StoreProductGroupPriceResponse implements Serializable {
        @ApiModelProperty("参团人数")
        private Integer joinPersonNumber;

        @ApiModelProperty("拼团人数对应规格价格")
        private List<SkuPrice> skuPrices;

        @Data
        public static class SkuPrice implements Serializable {
            @ApiModelProperty("拼团价格id")
            private Integer id;

            @ApiModelProperty("源skuid")
            private String sourceSkuId;

            @ApiModelProperty("sku")
            private String sku;

            @ApiModelProperty("可用库存")
            private Integer useStock;

            @ApiModelProperty("sku图片")
            private String image;

            @ApiModelProperty("库存")
            private Integer stock;

            @ApiModelProperty("库存")
            private Integer groupStock;

            @ApiModelProperty("原价")
            private BigDecimal price;

            @ApiModelProperty("拼团价")
            private BigDecimal packagePrice;
        }
    }
}
